import requests, pprint

session = requests.session()
login_url = 'http://localhost/api/mgr/signin'
payload = {
    'username': 'hff',
    'password': '88888888'
}
session.post(login_url, data=payload)

url = 'http://localhost/api/mgr/customers'
params = {
    "action":"list_customer",
    "pagenum": 2,
    "pagesize": 20,
    "keywords": "扁鹊 李元芳 0"
}

res = session.get(url, params=params)
print(res)
pprint.pprint(res.json(), sort_dicts=0)